3.512 \(\int \frac{\tan (e+f x)}{\sqrt{a+b \sin ^2(e+f x)}} \, dx\)

Optimal. Leaf size=36 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \sin ^2(e+f x)}}{\sqrt{a+b}}\right )}{f \sqrt{a+b}} \]

[Out]

ArcTanh[Sqrt[a + b*Sin[e + f*x]^2]/Sqrt[a + b]]/(Sqrt[a + b]*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0506633, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3194, 63, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \sin ^2(e+f x)}}{\sqrt{a+b}}\right )}{f \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]/Sqrt[a + b*Sin[e + f*x]^2],x]

[Out]

ArcTanh[Sqrt[a + b*Sin[e + f*x]^2]/Sqrt[a + b]]/(Sqrt[a + b]*f)

Rule 3194

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x]^2, x]}, Dist[ff^((m + 1)/2)/(2*f), Subst[Int[(x^((m - 1)/2)*(a + b*ff*x)^p)/(1 - ff*x)^((
m + 1)/2), x], x, Sin[e + f*x]^2/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\tan (e+f x)}{\sqrt{a+b \sin ^2(e+f x)}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{(1-x) \sqrt{a+b x}} \, dx,x,\sin ^2(e+f x)\right )}{2 f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{1+\frac{a}{b}-\frac{x^2}{b}} \, dx,x,\sqrt{a+b \sin ^2(e+f x)}\right )}{b f}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \sin ^2(e+f x)}}{\sqrt{a+b}}\right )}{\sqrt{a+b} f}\\ \end{align*}

Mathematica [A]  time = 0.0396189, size = 38, normalized size = 1.06 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a-b \cos ^2(e+f x)+b}}{\sqrt{a+b}}\right )}{f \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]/Sqrt[a + b*Sin[e + f*x]^2],x]

[Out]

ArcTanh[Sqrt[a + b - b*Cos[e + f*x]^2]/Sqrt[a + b]]/(Sqrt[a + b]*f)

________________________________________________________________________________________

Maple [B]  time = 2.641, size = 113, normalized size = 3.1 \begin{align*}{\frac{1}{2\,f}\ln \left ( 2\,{\frac{\sqrt{a+b}\sqrt{a+b-b \left ( \cos \left ( fx+e \right ) \right ) ^{2}}+b\sin \left ( fx+e \right ) +a}{-1+\sin \left ( fx+e \right ) }} \right ){\frac{1}{\sqrt{a+b}}}}+{\frac{1}{2\,f}\ln \left ( 2\,{\frac{\sqrt{a+b}\sqrt{a+b-b \left ( \cos \left ( fx+e \right ) \right ) ^{2}}-b\sin \left ( fx+e \right ) +a}{1+\sin \left ( fx+e \right ) }} \right ){\frac{1}{\sqrt{a+b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x)

[Out]

1/2/(a+b)^(1/2)/f*ln(2/(-1+sin(f*x+e))*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)+b*sin(f*x+e)+a))+1/2/(a+b)^(1/2
)/f*ln(2/(1+sin(f*x+e))*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)-b*sin(f*x+e)+a))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.08465, size = 286, normalized size = 7.94 \begin{align*} \left [\frac{\log \left (\frac{b \cos \left (f x + e\right )^{2} - 2 \, \sqrt{-b \cos \left (f x + e\right )^{2} + a + b} \sqrt{a + b} - 2 \, a - 2 \, b}{\cos \left (f x + e\right )^{2}}\right )}{2 \, \sqrt{a + b} f}, -\frac{\sqrt{-a - b} \arctan \left (\frac{\sqrt{-b \cos \left (f x + e\right )^{2} + a + b} \sqrt{-a - b}}{a + b}\right )}{{\left (a + b\right )} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

[1/2*log((b*cos(f*x + e)^2 - 2*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a + b) - 2*a - 2*b)/cos(f*x + e)^2)/(sqrt(
a + b)*f), -sqrt(-a - b)*arctan(sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(-a - b)/(a + b))/((a + b)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (e + f x \right )}}{\sqrt{a + b \sin ^{2}{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(a+b*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(tan(e + f*x)/sqrt(a + b*sin(e + f*x)**2), x)

________________________________________________________________________________________

Giac [B]  time = 1.26318, size = 132, normalized size = 3.67 \begin{align*} -\frac{2 \, \arctan \left (-\frac{\sqrt{a} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - \sqrt{a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + a} - \sqrt{a}}{2 \, \sqrt{-a - b}}\right )}{\sqrt{-a - b} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

-2*arctan(-1/2*(sqrt(a)*tan(1/2*f*x + 1/2*e)^2 - sqrt(a*tan(1/2*f*x + 1/2*e)^4 + 2*a*tan(1/2*f*x + 1/2*e)^2 +
4*b*tan(1/2*f*x + 1/2*e)^2 + a) - sqrt(a))/sqrt(-a - b))/(sqrt(-a - b)*f)